package com.mrjy.queries.bo;

import com.mrjy.common.entity.RecordInfo;
import com.mrjy.maintain.dao.IRecordInfoDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Service("RecordInfoBo")
public class RecordInfoBo implements IRecordInfoBo {

    @Resource
    IRecordInfoDao recordInfoDao;

    @Override
    public Object insert(RecordInfo info) {
        Map map = new HashMap();
        int insert = recordInfoDao.insert(info);
        if (insert > 0) {
            map.put("err_code", 0);
            map.put("err_msg", "插入成功");
        } else {
            map.put("err_code", 1);
            map.put("err_msg", "插失失败");
        }
        return map;
    }
}
